# 接口对象层
import requests


class IhrmLoginApi(object):
    # 登录方法
    @classmethod
    def login(cls, json_data):
        resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                             headers={"Content-Type": "application/json"},
                             json=json_data)
        return resp

# 验证是否成功
# if __name__ == '__main__':
#     data = {"mobile": "13800000002", "password": "123456"}
#     resp = IhrmLoginApi.login(data)
#     print(resp.json())